﻿@model Blog.Models.BlogRollModel

@{
    ViewBag.Title = "EditLink";
}

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <h2>Redigera Länk</h2>

    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()

        <div class="form-horizontal">
            <h4>BlogRollModel</h4>
            <hr />
            @Html.ValidationSummary(true)

            <div class="form-group">
                @Html.LabelFor(model => model.Title, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Title)
                    @Html.ValidationMessageFor(model => model.Title)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Url, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Url)
                    @Html.ValidationMessageFor(model => model.Url)
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="Uppdatera" class="btn btn-default" />
                    @if (ViewBag.Saved != null)
                    {
                        <p style="color: red;">@ViewBag.Saved</p>
                    }
                </div>
            </div>
        </div>
    }
</div>

@section scripts
{
    @Scripts.Render("~/bundles/jqueryval")
}
